package com.sh.设计模式.工厂模式相关.简单工厂模式又叫静态工厂方法模式;

// 测试
public class SimpleFactoryTest {
    public static void main(String[] args) {
        Car car1 = CarFactory.createCar("BMW");
        car1.drive();  // Driving BMW

        Car car2 = CarFactory.createCar("Audi");
        car2.drive();  // Driving Audi
    }
}